package com.cy.sapling.search.service;

import com.cy.sapling.search.entity.Goods;
import com.cy.sapling.search.hystrix.GoodsServiceHystrix;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Created by Administrator on 2017/11/21.
 */
@FeignClient(name = "sapling-service-search",fallback = GoodsServiceHystrix.class)
public interface GoodsService {
    @RequestMapping("/goodsById/{id}")
    Goods goodsById(@PathVariable("id") Long id);

    @RequestMapping("/getAllList")
    List<Goods> getAllList();
}
